package com.balabala.service.serviceImpl;

import com.balabala.DTO.VideoDTO;
import com.balabala.entity.VideoEntity;
import com.balabala.mapper.AnimationMapper;
import com.balabala.service.AnimationService;
import com.balabala.utils.BeanHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AnimationServiceImpl implements AnimationService {

    @Autowired
    private AnimationMapper animationMapper;

    /**
     * 查询动漫分区日推
     * @return
     */
    @Override
    public List<VideoDTO> queryDailyPush() {
        List<VideoEntity> videoEntities = animationMapper.queryDailyPush();
        return BeanHelper.copyWithCollection(videoEntities,VideoDTO.class);
    }
}
